#ifndef __XSIP_DATA_RECEIVER_H__
#define __XSIP_DATA_RECEIVER_H__
#include "xobject.h"

class XSIPTransaction;
class XSIPResponse;
class XSIP_API XSIPDataReceiver {
public:
	virtual void onResponse(XSIPTransaction *transaction, XSIPResponse* response) = 0;
	virtual void onDataRead(XSIPTransaction *transaction, void* data, int size) = 0;
	virtual void onComplete(XSIPTransaction *transaction, int status, XSIPResponse* response) = 0;
};

class XSIP_API XSIPDataReceiverEx : public XSIPDataReceiver {
public:
	virtual void onDataRead(XSIPTransaction *transaction, XSIPResponse* response, int result) = 0;
private:
	virtual void onResponse(XSIPTransaction *transaction, XSIPResponse* response);
	virtual void onDataRead(XSIPTransaction *transaction, void* data, int size);
	virtual void onComplete(XSIPTransaction *transaction, int status, XSIPResponse* response);
};

#endif